.TH "OSM2PGSQL" "1" "2.2.0" "" ""
.SH NAME
.PP
osm2pgsql-expire - Visualize expire output
.SH SYNOPSIS
.PP
\f[B]osm2pgsql-expire\f[R] [\f[I]OPTIONS\f[R]] \f[I]OSM-FILE\f[R] (1)
\f[B]osm2pgsql-expire\f[R] \f[I]TILES-FILE\f[R] (2)
.SH DESCRIPTION
.PP
\f[B]This command is currently experimental.\f[R]
.PP
The expire command can be used for two things:
.IP "1." 3
\f[B]To check what tiles some OSM data is in.\f[R] If an
\f[I]OSM-FILE\f[R] is specified osm2pgsql-expire will calculate the
tiles covering the objects in that file.
Note that the file must not be a change file but a regular OSM data
file!
Output is, by default, a tile file, but GeoJSON is also possible.
Covering tiles are only calculated for tagged objects.
.IP "2." 3
\f[B]Visualize tile list.\f[R] If a \f[I]TILE-FILE\f[R] (presumably
generated by osm2pgsql) is specified, a GeoJSON file is generated
showing all mentioned tiles.
In this mode all command line options are ignored.
.PP
Read the \f[I]Expire\f[R] chapter of the osm2pgsql manual
(https://osm2pgsql.org/doc/manual.html#expire) for details on how to
interpret the \f[V]-m, \[rs]--mode\f[R] and
\f[V]\[rs]--full-area-limit\f[R] options.
.SH GEOMETRY GENERATION
.PP
To calculate the tiles covering the specified OSM data in mode (1), a
geometry has to be generated first for each object.
This works as follow:
.IP \[bu] 2
For nodes a point geometry will be generated.
.IP \[bu] 2
For closed ways a polygon geometry will be generated, for non-closed
ways a linestring geometry.
If a generated polygon is not valid, the program will fall back to a
linestring.
If neither a valid polygon nor a valid linestring can be generated the
object is ignored.
.IP \[bu] 2
For relations a geometry is generated based on the \f[V]type\f[R] tag.
For types \f[V]multipolygon\f[R] and \f[V]boundary\f[R], a multipolygon
geometry is created, for types \f[V]route\f[R] and
\f[V]multilinestring\f[R] a multilinestring geometry is created, for all
other types a geometry collection is created.
.PP
Note that for (multi)polygons it depends on the command line options
--mode and --full-area-limit whether the tiles calculation is based on
the area or the boundary of the (multi)polygons.
.SH OPTIONS
.PP
This program follows the usual GNU command line syntax, with long
options starting with two dashes (\f[V]--\f[R]).
Mandatory arguments to long options are mandatory for short options too.
.SH MAIN OPTIONS
.TP
-b, --buffer=VALUE
Set buffer size around geometry relative to tile size.
Example: Set to 0.1 for a buffer that\[cq]s 10% of the tile size.
.TP
-f, --format=FORMAT
Output format.
Options are `tiles' (default) or `geojson'.
The GeoJSON output uses the Web Mercator projection (EPSG:3857) which is
supported by many programs although, strictly speaking, it is not
allowed by the GeoJSON spec.
.TP
--full-area-limit=VALUE
Set full area limit.
.TP
-m, --mode=MODE
Set expire mode.
One of \f[V]boundary_only\f[R], \f[V]full_area\f[R] (default), and
\f[V]hybrid\f[R].
.TP
-z, --zoom=ZOOM
Zoom level on which to calculate tiles.
.SH HELP/VERSION OPTIONS
.TP
-h, --help
Print help.
.TP
-V, --version
Print osm2pgsql version.
.SH LOGGING OPTIONS
.TP
--log-level=LEVEL
Set log level (`debug', `info' (default), `warn', or `error').
.SH SEE ALSO
.IP \[bu] 2
osm2pgsql website (https://osm2pgsql.org)
.IP \[bu] 2
osm2pgsql manual (https://osm2pgsql.org/doc/manual.html)
.IP \[bu] 2
\f[B]osm2pgsql\f[R](1)
.IP \[bu] 2
\f[B]postgres\f[R](1)
.IP \[bu] 2
\f[B]osmcoastline\f[R](1)
